package com.twq.corejava.object;

import com.twq.corejava.Person;

public class StringPersonPair implements Pair<String, Person> {
    private String first;
    private Person second;

    public StringPersonPair(String first, Person second) {
        this.first = first;
        this.second = second;
    }

    @Override
    public String getFirst() {
        return first;
    }

    @Override
    public Person getSecond() {
        return second;
    }

    public static void main(String[] args) {
        StringPersonPair pair = new StringPersonPair("str", new Person("张三", 30));

        System.out.println(pair.getFirst());
        System.out.println(pair.getSecond());
    }
}
